<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../static/layui-v2.5.3/layui/css/layui.css">
<script type="text/javascript" src="../static/layui/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="../static/layui-v2.5.3/layui/layui.js"></script>
<script type="text/javascript" src="../static/js/custom.js"></script>
<script type="text/javascript" src="../static/js/dataTable.js"></script>
<style type="text/css">
	#file {
    position: relative;
    display: inline-block;
    background: #D0EEFF;
    border: 1px solid #99D3F5;
    border-radius: 4px;
    padding: 4px 12px;
    overflow: hidden;
    color: #1E88C7;
    text-decoration: none;
    text-indent: 0;
    line-height: 20px;
}
#file input {
    position: absolute;
    font-size: 100px;
    right: 0;
    top: 0;
    opacity: 0;
}
#file:hover {
    background: #AADFFD;
    border-color: #78C3F3;
    color: #004974;
    text-decoration: none;
}
</style>
</head>
<body>
	<div style="margin:40px 100px 0 20px">
	<form class="layui-form" action="save" method="post"lay-filter="myform" id="myform" enctype="multipart/form-data">
		<input type="hidden" name="id" th:value="${model.id}" id="id">
		<div class="layui-form-item">
				<label class="layui-form-label">类型</label>
				<div class="layui-input-block">
					<select name="type"id="type">
						<option th:each="t:${types}" th:value="${t.id}"th:text="${t.type}" th:selected="${t.type==model.typeName}"></option>
					</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">图书编号</label>
				<div class="layui-input-block">
					<input type="text" name="byid" placeholder="请输入权限名称" th:value="${model.byid}" class="layui-input" id="byid" lay-verify="required" required>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">书名</label>
				<div class="layui-input-block">
					<input type="text" name="title" placeholder="请输入代码"th:value="${model.title}" class="layui-input" id="title"lay-verify="required" required>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">作者</label>
				<div class="layui-input-block">
					<input type="text" name="suthor"placeholder="请输入代码"th:value="${model.suthor}" class="layui-input" id="suthor"lay-verify="required" required>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">ISBN</label>
				<div class="layui-input-block">
					<input type="text" name="isbn"placeholder="请输入ISBN" th:value="${model.isbn}"class="layui-input" id="isbn"lay-verify="required" required>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">数量</label>
				<div class="layui-input-block">
					<input type="text" name="number" placeholder="请输入代码" th:value="${model.number}"class="layui-input" id="number"lay-verify="required" required>
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">图片</label>
				<div class="layui-input-block">
					<input type="file" name="file" id="file" style="width: 90%" lay-verify="required" required >
				</div>
			</div>
		</form>
</div>
	<script type="text/javascript">
	layui.use('form', function(){  //此段代码必不可少
	    var form = layui.form;
	    form.render();
	});
</script>
</body>
</html>